#include <stdio.h>
#include <stdint.h>
#include "chemnitz_socket.h"

int main (void)
{
	CHEMNITZ_SOCKET sock;
	size_t n;
	uint8_t buffer [1024];
	uint32_t bytes;
	
	sock = chemnitz_socket_open ();
	if (! chemnitz_socket_is_open (sock))
	{
		return 1;
	}

	bytes = 0x60;
	n = chemnitz_socket_read (sock, buffer, bytes);
	n = (size_t) write (1, buffer, n);

	chemnitz_socket_close (sock);
	return 0;
}

